package com.myproject.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
public class HelloController1 {

    private static final Logger logger = LoggerFactory.getLogger(HelloController1.class);


    @PostMapping("/add")
    public String method(@RequestBody String name){

        logger.info("controller method");

        return "hello";
    }

    @PostMapping("/test")
    public String method1(HttpServletRequest request){

        System.out.println(request.getClass().getName());
        logger.info("controller method");

        return "hello";
    }





}
